


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html id="htmlId">
<head>
  <title>Coverage Report :: Customer</title>
  <style type="text/css">
    @import "../../.css/coverage.css";
  </style>
</head>

<body>
<div class="header"></div>

<div class="content">
<div class="breadCrumbs">
    [ <a href="../../index.html">all classes</a> ]
    [ <a href="../index.html">com.manning.junitbook.ch12.nested</a> ]
</div>

<h1>Coverage Summary for Class: Customer (com.manning.junitbook.ch12.nested)</h1>

<table class="coverageStats">

<tr>
  <th class="name">Class</th>
<th class="coverageStat 
">
  Method, %
</th>
<th class="coverageStat 
">
  Line, %
</th>
</tr>
<tr>
  <td class="name">Customer</td>
<td class="coverageStat">
  <span class="percent">
    100%
  </span>
  <span class="absValue">
    (9/ 9)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    100%
  </span>
  <span class="absValue">
    (22/ 22)
  </span>
</td>
</tr>
  <tr>
    <td class="name">Customer$1</td>
  </tr>
  <tr>
    <td class="name">Customer$Builder</td>
<td class="coverageStat">
  <span class="percent">
    100%
  </span>
  <span class="absValue">
    (5/ 5)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    100%
  </span>
  <span class="absValue">
    (11/ 11)
  </span>
</td>
  </tr>
<tr>
  <td class="name"><strong>total</strong></td>
<td class="coverageStat">
  <span class="percent">
    100%
  </span>
  <span class="absValue">
    (14/ 14)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    100%
  </span>
  <span class="absValue">
    (33/ 33)
  </span>
</td>
</tr>
</table>

<br/>
<br/>


<div class="sourceCode"><i>1</i>&nbsp;/*
<i>2</i>&nbsp; * ========================================================================
<i>3</i>&nbsp; *
<i>4</i>&nbsp; * Licensed to the Apache Software Foundation (ASF) under one or more
<i>5</i>&nbsp; * contributor license agreements.  See the NOTICE file distributed with
<i>6</i>&nbsp; * this work for additional information regarding copyright ownership.
<i>7</i>&nbsp; * The ASF licenses this file to You under the Apache License, Version 2.0
<i>8</i>&nbsp; * (the &quot;License&quot;); you may not use this file except in compliance with
<i>9</i>&nbsp; * the License.  You may obtain a copy of the License at
<i>10</i>&nbsp; *
<i>11</i>&nbsp; *   http://www.apache.org/licenses/LICENSE-2.0
<i>12</i>&nbsp; *
<i>13</i>&nbsp; * Unless required by applicable law or agreed to in writing, software
<i>14</i>&nbsp; * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
<i>15</i>&nbsp; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<i>16</i>&nbsp; * See the License for the specific language governing permissions and
<i>17</i>&nbsp; * limitations under the License.
<i>18</i>&nbsp; *
<i>19</i>&nbsp; * ========================================================================
<i>20</i>&nbsp; */
<i>21</i>&nbsp;
<i>22</i>&nbsp;package com.manning.junitbook.ch12.nested;
<i>23</i>&nbsp;
<i>24</i>&nbsp;import java.util.Date;
<i>25</i>&nbsp;import java.util.Objects;
<i>26</i>&nbsp;
<b class="fc"><i>27</i>&nbsp;public class Customer {</b>
<i>28</i>&nbsp;	private Gender gender;
<i>29</i>&nbsp;	private String firstName;
<i>30</i>&nbsp;	private String lastName;
<i>31</i>&nbsp;
<i>32</i>&nbsp;	private String middleName;
<i>33</i>&nbsp;	private Date becomeCustomer;
<i>34</i>&nbsp;	
<b class="fc"><i>35</i>&nbsp;	public static class Builder {</b>
<i>36</i>&nbsp;		private Gender gender;
<i>37</i>&nbsp;		private String lastName;
<i>38</i>&nbsp;		private String firstName;
<i>39</i>&nbsp;		
<i>40</i>&nbsp;		private String middleName;
<i>41</i>&nbsp;		private Date becomeCustomer;
<i>42</i>&nbsp;		
<b class="fc"><i>43</i>&nbsp;		public Builder(Gender gender, String firstName, String lastName) {</b>
<b class="fc"><i>44</i>&nbsp;			this.gender = gender;</b>
<b class="fc"><i>45</i>&nbsp;			this.firstName = firstName;</b>
<b class="fc"><i>46</i>&nbsp;			this.lastName = lastName;</b>
<b class="fc"><i>47</i>&nbsp;		}</b>
<i>48</i>&nbsp;		
<i>49</i>&nbsp;		public Builder withMiddleName(String middleName) {
<b class="fc"><i>50</i>&nbsp;		  this.middleName = middleName;</b>
<b class="fc"><i>51</i>&nbsp;		  return this; </b>
<i>52</i>&nbsp;		}
<i>53</i>&nbsp;
<i>54</i>&nbsp;		
<i>55</i>&nbsp;		public Builder withBecomeCustomer(Date becomeCustomer)	{
<b class="fc"><i>56</i>&nbsp;			this.becomeCustomer = becomeCustomer;</b>
<b class="fc"><i>57</i>&nbsp;			return this; </b>
<i>58</i>&nbsp;		}
<i>59</i>&nbsp;		
<i>60</i>&nbsp;		public Customer build() {
<b class="fc"><i>61</i>&nbsp;			return new Customer(this);</b>
<i>62</i>&nbsp;		}
<i>63</i>&nbsp;	}
<i>64</i>&nbsp;	
<b class="fc"><i>65</i>&nbsp;	private Customer(Builder builder) {</b>
<b class="fc"><i>66</i>&nbsp;		this.gender = builder.gender;</b>
<b class="fc"><i>67</i>&nbsp;		this.firstName = builder.firstName;</b>
<b class="fc"><i>68</i>&nbsp;		this.lastName = builder.lastName;</b>
<b class="fc"><i>69</i>&nbsp;		this.middleName = builder.middleName;</b>
<b class="fc"><i>70</i>&nbsp;		this.becomeCustomer = builder.becomeCustomer;</b>
<b class="fc"><i>71</i>&nbsp;	}</b>
<i>72</i>&nbsp;
<i>73</i>&nbsp;	public Gender getGender() {
<b class="fc"><i>74</i>&nbsp;		return gender;</b>
<i>75</i>&nbsp;	}
<i>76</i>&nbsp;
<i>77</i>&nbsp;	public String getFirstName() {
<b class="fc"><i>78</i>&nbsp;		return firstName;</b>
<i>79</i>&nbsp;	}
<i>80</i>&nbsp;
<i>81</i>&nbsp;	public String getLastName() {
<b class="fc"><i>82</i>&nbsp;		return lastName;</b>
<i>83</i>&nbsp;	}
<i>84</i>&nbsp;
<i>85</i>&nbsp;	public String getMiddleName() {
<b class="fc"><i>86</i>&nbsp;		return middleName;</b>
<i>87</i>&nbsp;	}
<i>88</i>&nbsp;
<i>89</i>&nbsp;	public Date getBecomeCustomer() {
<b class="fc"><i>90</i>&nbsp;		return becomeCustomer;</b>
<i>91</i>&nbsp;	}
<i>92</i>&nbsp;
<i>93</i>&nbsp;	@Override
<i>94</i>&nbsp;	public boolean equals(Object o) {
<b class="fc"><i>95</i>&nbsp;		if (this == o) return true;</b>
<b class="fc"><i>96</i>&nbsp;		if (o == null || getClass() != o.getClass()) return false;</b>
<b class="fc"><i>97</i>&nbsp;		Customer customer = (Customer) o;</b>
<b class="fc"><i>98</i>&nbsp;		return gender == customer.gender &amp;&amp;</b>
<b class="fc"><i>99</i>&nbsp;				Objects.equals(firstName, customer.firstName) &amp;&amp;</b>
<b class="fc"><i>100</i>&nbsp;				Objects.equals(lastName, customer.lastName) &amp;&amp;</b>
<b class="fc"><i>101</i>&nbsp;				Objects.equals(middleName, customer.middleName) &amp;&amp;</b>
<b class="fc"><i>102</i>&nbsp;				Objects.equals(becomeCustomer, customer.becomeCustomer);</b>
<i>103</i>&nbsp;	}
<i>104</i>&nbsp;
<i>105</i>&nbsp;	@Override
<i>106</i>&nbsp;	public int hashCode() {
<i>107</i>&nbsp;
<b class="fc"><i>108</i>&nbsp;		return Objects.hash(gender, firstName, lastName, middleName, becomeCustomer);</b>
<i>109</i>&nbsp;	}
<i>110</i>&nbsp;}
</div>
</div>

<div class="footer">
    
    <div style="float:right;">generated on 2020-01-02 17:54</div>
</div>
</body>
</html>
